package dto;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 
 * @author zirbom
 * 
 */
public class AdminMessageDTO implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private int id;
	private String content;
	private int idSender;
	private String type;
	private Date date;
	private String formattedDate;

	/**
	 * GETTERS & SETTERS
	 */
	public int getId() {

		return id;
	}

	public AdminMessageDTO() {

	}

	public AdminMessageDTO(String content, int idSender, String type, Date date) {
		super();
		this.content = content;
		this.idSender = idSender;
		this.type = type;
		this.date = date;

		SimpleDateFormat formatter = new SimpleDateFormat();
		formatter = new SimpleDateFormat("dd.MM.yyyy HH:mm");
		this.formattedDate = formatter.format(date);
	}

	public void setId(int id) {

		this.id = id;
	}

	public String getContent() {

		return content;
	}

	public void setContent(String content) {

		this.content = content;
	}

	public int getIdSender() {

		return idSender;
	}

	public void setIdSender(int idSender) {

		this.idSender = idSender;
	}

	public String getType() {

		return type;
	}

	public void setType(String type) {

		this.type = type;
	}

	public Date getDate() {

		return date;
	}

	public String getFormattedDate() {
		return formattedDate;
	}

	public void setDate(Date date) {

		this.date = date;
		SimpleDateFormat formatter = new SimpleDateFormat();
		formatter = new SimpleDateFormat("dd.MM.yyyy HH:mm");
		this.formattedDate = formatter.format(date);
	}

	public static long getSerialversionuid() {

		return serialVersionUID;
	}

}
